{% extends "cab/base.html" %}

{% block title %}{{title}} - {{block.super}}{% endblock %}

{% block content %}

<h1>{{title}}</h1>
{% ifequal action "add" %}
<p>
  <strong>
    Please remember that this site is not a pastebin or debugging tool; 
    it is intended for finished, working pieces of code.
  </strong>
    If you need someplace to temporarily post some code while others help
    you debug it, please use the pastebin like <a href="http://paste.pocoo.org">paste.pocoo.org</a>.
</p>
{% endifequal %}

<p>Remember: by posting a snippet, you agree to let anyone make use of the code.</p>

{% if preview %}
<h2>Preview</h2>
<div class="preview">
<h1>{{snippet.title}}</h1>
<div id="snippet-description">
{{ snippet.description_html|safe }}   
</div>
<div id="snipped-code">
{{ snippet.highlighted_code|safe }}
</div>

</div>
{% endif %}

<form method="post" action="">
<table>
{{form}}
<tr>
  <th></th>
  <td>
    <input type="submit" name="preview" value="Preview" class="button" />
    <input type="submit" value="Save" class="button"/>
  </td>
</tr>
</table>
</form>







{% endblock %}